﻿using System.Configuration;
using System.Web;
using System;

namespace FinancePortal.Web.Model
{
    public class ResourceManagement
    {
        public static string GetSOEID(HttpRequestBase context)
        {
            if (ConfigurationManager.AppSettings["SiteDebug"] == "1")
                return "BF78548"; //MD84317
            else
            {
                var soeid = context.Params["HTTP_SM_USER"].ToUpper();

                if (String.IsNullOrEmpty(soeid))
                    throw new NullReferenceException("Não foi possível recuperar o SOEID via Request");

                return soeid;
            }
        }
    }
}